import request from "../utils/request";
// 根据id商城信息
export function getById(id) {
  return request.get(`/shoppingMalls/${id}`);
}
// 获取商城信息
export function getList(params) {
  return request.get("/shoppingMalls", { params: params });
}
// 修改状态
export function vimState(id, delivery) {
  return request.post(`/shoppingMalls/IsActived/${id}`, delivery);
}
// 添加商城信息
export function addMall(data) {
  return request.post("/shoppingMalls", data, {
    "Content-Type": " multipart/form-data",
  });
}

// 修改商城信息
export function modMall(id, data) {
  return request.put(`/shoppingMalls/${id}`, data, {
    "Content-Type": " multipart/form-data",
  });
}
//删除商城信息
export function deleteMall(id, data) {
  return request.delete(`/shoppingMalls/${id}`, data);
}
